﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MWRCommunicationLibrary.ARS408
{
    public class In_SpeedInfomation : MWRData
    {
        public override int DefaultCanID
        {
            get
            {
                return 0x300;
            }
        }

        public override int Length
        {
            get
            {
                return 2;
            }
        }

        /// <summary>
        /// 0x0: standstill 
        /// 0x1: forward 
        /// 0x2: backward
        /// </summary>
        [ParamDecodor(6, 2)]
        public int SpeedDirection { get; set; }

        /// <summary>
        /// Absolute magnitude of speed in the direction the radar 
        /// is moved while looking into positive straight ahead
        /// direction
        /// unit: m/s
        /// </summary>
        [ParamDecodor(8, 13, 0.02, 0)]
        public double Speed { get; set; }
    }
}
